
<div>
	<table id="allUser" lay-filter="allUser" class="layui-table"></table>
</div>
<script type="text/html" id="userTopTool">
<div class="layui-btn-group userTopTool">
	<button class="layui-btn layui-btn-sm" lay-event="addUser"> <i class="layui-icon">&#xe654;</i> 添加 </button>
	<button class="layui-btn layui-btn-sm" lay-event="deleteUser"> <i class="layui-icon">&#xe640;</i> 删除 </button>
	<button class="layui-btn layui-btn-sm" lay-event="flushUser"> <i class="layui-icon">&#x1002;</i> 刷新 </button>
	<!-- <button class="layui-btn layui-btn-sm" data-type="exportUser"> <i class="layui-icon">&#xe601;</i> 导出 </button> -->
</div>
</script>

<script type="text/html" id="checkboxTpl">
  <!-- 这里的 checked 的状态只是演示 -->
  <input type="checkbox" name="lock" value="{{d.enable}}" title="冻结" lay-filter="lockUser" {{ d.enable == 0 ? 'checked' : '' }}>
</script>

<script type="text/html" id="userToolbar">
  <a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon">&#xe642;</i> 编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs {{ d.id == 1 ? 'layui-disabled' : '' }}" lay-event="{{ d.id == 1 ? '' : 'del' }}"><i class="layui-icon">&#xe640;</i> 删除</a>
</script>


<script>
	$(document).ready(function() {
		layui.use(['element','laytpl','table','form','formSelects','layer'], function() {
			var element = layui.element;
			var laytpl = layui.laytpl;
			var table = layui.table;
			var form = layui.form;
			var formSelects = layui.formSelects;
			var layer = layui.layer;
			
			var userManager = new UserManager();
			userManager.init(element,table, form, laytpl, formSelects,layer);
		});
	});
</script>
